<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%><%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertDefinition name="layout">
	<tiles:putAttribute name="head">
		<style type="text/css">
.seacheForm label {
	
}

.student tbody th {
	text-align: right;
}
</style>
		<style type="text/css">
.seacheForm label {
	
}

.student tbody th {
	text-align: right;
}
</style>

		<script type="text/javascript">
	    var id;

	    function selectConsultor(user) {
		helper.confirm("确认", "确定要变更该学员的咨询师为" + user.name + "?", function() {
		    //var id = $(source).attr("id");
		    var url = "../front/doAppointConsultor";
		    $.post(url, {
			studentId : id,
			consultId : user.id
		    }, function(data) {
			helper.showMsg(data, {
			    successHandler : function() {
				location.reload();
			    }
			});
		    });
		});
	    }

	    function selectTutor(user) {
		helper.confirm("确认", "确定要变更该学员的指导员为" + user.name + "?", function() {
		    //var id = $(source).attr("id");
		    var url = "../front/doAppointTutor";
		    $.post(url, {
			studentId : id,
			tutorId : user.id
		    }, function(data) {
			helper.showMsg(data, {
			    successHandler : function() {
				location.reload();
			    }
			});
		    });
		});
	    }

	    $(function() {
		$(".ajax").anchorAjax(function(a, data) {
		    if (data.success) {
			$(a).find("i").toggleClass("icon-star-empty");
			$(a).find("i").toggleClass("icon-star");
		    }
		});

		$(".frame").frameDialog({
		    width : 500,
		    height : 500,
		    close : function() {
			location.reload();
		    }
		}, function(source) {
		    id = $(source).attr("id");
		});

		$(".dailog").frameDialog({
		    close : function() {
			if (art.dialog.data("success")) {
			    location.reload();
			}
		    }
		});

		$(".confirm").confirmDialog(function(data) {
		    helper.showMsg(data, {
			okHandler : function() {
			    location.reload();
			}
		    });
		});
	    });
	</script>
	</tiles:putAttribute>
	<tiles:putAttribute name="mainBody">
		<ul class="breadcrumb">
			<li><s:url action="listStudent" namespace="/student" id="listStudent">
				</s:url> <a href="${listStudent}">学员列表</a> <span class="divider">/</span></li>
			<li><s:url action="modifyStudent" namespace="/student" id="modifyStudent">
					<s:param name="id" value="#student.id"></s:param>
				</s:url> <a href="${modifyStudent}">编辑学员</a> <span class="divider">/</span></li>
			<li class="active">学员档案-按时排序</li>
		</ul>
		<jsp:include page="/log/panels/studentInfo.jsp"></jsp:include>
		<jsp:include page="/log/panels/signCourse.jsp"></jsp:include>
		<jsp:include page="/log/panels/searchPanel.jsp"></jsp:include>

		<div class="row-fluid">
			<s:if test="'OrderLesson' in types.keys">
				<s:set name="logs" value="#logTypes.get('OrderLesson')" />
				<s:if test="#logs.size > 0">
					<div class="span6">
						<h3>
							<s:property value="types.get('OrderLesson')" />
						</h3>
						<dl class="well">
							<s:url namespace="/lesson" action="viewLesson" id="viewLesson">
								<s:param name="id" value="lesson.id"></s:param>
							</s:url>
							<s:iterator value="#logs" var="log">
								<jsp:include page="/log/panels/schoolLog.jsp"></jsp:include>
							</s:iterator>
						</dl>
					</div>
				</s:if>
			</s:if>
			<div class="span6">
				<s:iterator value="types.keys" var="type">
					<s:set name="logs" value="#logTypes.get(#type)" />
					<s:if test="#type != 'OrderLesson' && #logs.size > 0">
						<h3>
							<s:property value="types.get(#type)" />
						</h3>
						<dl class="well">
							<s:iterator value="#logs" var="log">
								<jsp:include page="/log/panels/schoolLog.jsp"></jsp:include>
							</s:iterator>
						</dl>
					</s:if>

				</s:iterator>
			</div>
		</div>
	</tiles:putAttribute>
</tiles:insertDefinition>